import { Tag } from '@douyinfe/semi-ui';
import { ColumnProps } from '@douyinfe/semi-ui/lib/es/table';
import { format } from 'date-fns';

const BaseColumns: ColumnProps[] = [
  {
    title: '姓名',
    dataIndex: 'name',
  },
  {
    title: '产业集团',
    dataIndex: 'groupName',
  },
  {
    title: '所属企业',
    dataIndex: 'corporation',
  },
  {
    title: '所在部门',
    dataIndex: 'department',
  },
  {
    title: '业务范围',
    dataIndex: 'businessType',
  },
  {
    title: '邮箱地址',
    dataIndex: 'email',
  },
  {
    title: '联系方式',
    dataIndex: 'phoneNumber',
  },
  {
    title: '关联角色',
    dataIndex: 'roleList',
    render: (text: any) => {
      return (
        <div>
          {text.map((item: any, idx: number) => (
            <Tag key={idx} size='small' color='light-blue'>
              {item?.name}
            </Tag>
          ))}
        </div>
      );
    },
  },
];

export default BaseColumns;
